package edu.scau.mis.pos.mapper;

import edu.scau.mis.pos.domain.OrderItem;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface OrderItemMapper {
    int insertOrderItem(OrderItem orderItem);

    int deleteOrderItemById(Long orderItemId);

    int updateOrderItem(OrderItem orderItem);

    List<OrderItem> selectOrderItemsByOrderId(String orderId);

    int insertOrderItems(@Param("orderId") String orderId, @Param("items") List<OrderItem> items);

    int deleteByOrderId(@Param("orderId") String orderId);

    int updateOrderPriceAndQuantity(@Param("orderId") String orderId);


}
